/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mvp.levelup.oop.controller;

import java.util.Date;
import mvp.levelup.oop.model.Donator;
import mvp.levelup.oop.model.Player;
import mvp.levelup.oop.model.User;
import oop.model.UserTypes;

/**
 *
 * @author WORKSPOT2
 */
public class UserFactory
{

    private static int counter = 0;

    public static User createUser(String name, String surname, UserTypes type)
    {
        switch (type)
        {
            case PLAYER:
                return new Player(++counter, name, surname, new Date());
            case DONATOR:
                return new Donator(++counter, name, surname);
            default:
                return null;
        }
    }
}
